package com.yinhechuangji.application.feign;

import com.yinhechuangji.application.entity.UserBase;
import com.yinhechuangji.application.hystrix.UserFeignClientHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Auther: yaodx
 * @Date: 2018/7/2 19:47
 * @Description:
 */
@FeignClient(name="eureka-service",fallback = UserFeignClientHystrix.class)//Hystrix添加属性fallbackFactory可以实现打印错误日志
public interface UserFeignClient {

    @RequestMapping("/test")
    public UserBase test();

}
